#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const int N = 1e5 + 5;
inline ll read() {
    ll x = 0, f = 1;
    char c = getchar();
    while (c < '0' || c > '9') {if (c == '-') f = -1; c = getchar();}
    while (c >= '0' && c <= '9') x = x * 10 + c - '0', c = getchar();
    return x * f;
}
ll n, mini, last, ans;
ll a[N];
signed main(void) {
    freopen("duel.in", "r", stdin);
    freopen("duel.out", "w", stdout);
    n = read();
    for (register int i = 1; i <= n; i++) {
        a[i] = read();
    }
    sort(a + 1, a + n + 1);
    mini = a[1], last = 1, ans = n;
    for (register int i = 1; i <= n; i++) {
        if (a[i] == mini) continue;
        if (a[i] > a[last]) {
            ans--;
            last++;
        }
    }
    cout << ans << endl;
    return 0;
}
